<div class="panel-default">
  <div style='color: red'>请保证数据只有一条哦！不然会选择最新更新的一条数据</div>
  <table lay-filter="demo" lay-size='lg'>
    <thead>
      <tr>

        <th lay-data="{field:'phone'}"><%= UserCustom.human_attribute_name(:phone) %></th>

        <th lay-data="{field:'wechat_img'}"><%= UserCustom.human_attribute_name(:wechat_img) %></th>

        <th lay-data="{field:'operation',width:200}"></th>
      </tr>
    </thead>

    <tbody>
      <% @user_customs.each do |user_custom| %>
        <tr>

          <td><%= user_custom.phone %></td>

          <td><%=image_tag user_custom.wechat_img_url rescue '' %></td>

          <td>
            <%= link_to [:admin, user_custom], class: "label label-primary" do -%><i class="iconfont icon-chakan"></i>查看<% end %>
            <%= link_to edit_admin_user_custom_path(user_custom), class: "label" do -%><i class="iconfont icon-bianji"></i>编辑<% end %>
            <%= link_to [:admin, user_custom], method: :delete, data: { confirm: '确定删除吗? 注意此操作无法撤销！' }, class: "label label-danger" do -%><i class="iconfont icon-shanchu"></i>删除<% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <%= link_to new_admin_user_custom_path do -%><button type="button" class="layui-btn"><i class="layui-icon">&#xe608;</i> <%= t('actions.new') + UserCustom.model_name.human %></button><% end %>
</div>



